
<?php

if ($this->session->flashdata('message'))
    echo "<div class='message'>" . $this->session->flashdata('message') . "</div>";
$btn_search = array(
    'class' => 'btn btn-sm btn-primary btn-block',
    'value' => 'Buscar'
);
$btn_imprimir = array(
    'class' => 'btn btn-sm btn-primary btn-block',
    'value' => 'Imprimir'
);
$criterio = array('id' => 'criterio', 'name' => 'criterio', 'class' => 'form-control', 'size' => '50', 'value' => '');
echo validation_errors('<div class="error">', '</div>');
echo '</br>';
echo '<div class="panel panel-default">';
echo '<div class="panel-heading">Buscar</div>';
echo '<div class="panel-body">';
echo '<div class="row-fluid">
  <div class="col-lg-2">';
echo form_open('facturacion_controller/buscar');
echo form_submit($btn_search);
echo '</div>';
echo '<div class="col-lg-10">';
echo form_input($criterio);
echo form_close();
echo'</div>';
echo '</div></div>';

echo '</div></br>';
echo"<table>";
echo"<tr>";
echo"<td>";
echo '</div>';
echo"</td>";
echo"</tr>";
echo"</table>";


echo'<div class="panel panel-default">';
echo '<div class="panel-heading">Médicos</div>';
echo '<div class="panel-body">';

if ($lista == null) {
    echo 'No Hay Medicos';
} else {
    echo '<table cellpadding="0" cellspacing="0" border="1" class="table table-striped table-bordered table-condensed table-responsive" id="tblEspecialidades" width="100%">';
    echo "<thead>\n<tr>\n";
    echo "<th>Numero</th><th>Paciente</th><th>Total</th><th>Editar</th>\n";
    foreach ($lista as $fila) {
        $btn_editar = array(
            'class' => 'btn btn-sm btn-primary btn-block',
            'onclick' => 'saltar(' . $fila['id'] . ',' . site_url() . '/especialidad_controller/editar_view' . ')',
            'value' => 'Editar'
        );
        echo "<tr valign='top'>\n";
        echo "<td align='left'>" . $fila['numero'] . "</td>";
        echo "<td align='left'>" . $fila['nombres'] .' '. $fila['apellidos']. "</td>";
        echo "<td align='left'>" . $fila['total'] . "</td>";
        echo'<td align="left">';
        echo anchor("facturacion_controller/modificar/" . $fila['id'], 'editar', $btn_editar);
        echo "</tr>\n";
    }
    echo "</tbody></table>";
}
echo '</div></div>';
echo '<div class="panel panel-default">';
echo ' <div class="panel-body">';
echo '<div class="input-group">';
$btnCreate = array('type' => 'submit', 'class' => 'btn btn-sm btn-primary btn-block', 'value' => 'Crear');
echo form_open('medico_controller/crear');
echo form_submit($btnCreate);
echo form_close();
echo '</div></div></div></div>';
?>
